﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML >
<html>
	<head>
		<base href="<%=basePath%>">
		<title>二维码截图，很高级</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link rel="stylesheet"
			href="<%=request.getContextPath()%>/admin/css/pintuer.css">
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/w/js/jquery-1.6.4.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath()%>/w/js/html2canvas.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath()%>/w/js/jquery.plugin.html2canvas.js"></script>
	</head>

	<body style="background: #F5F5F5; font-size: 12px;">
		<s:include value="/w/tmptop.jsp"></s:include>
		<form id="formid" action="team!jietu.action" method="post">
			<input id="imagecode" name="imagecode" type="hidden" value="" />
		</form>

		<div id="canvas" style="display: none;"></div>
		<div class="div1" style="display: none;"></div>


		<div id="q">

			<!--one -->
			<div style="width: 100%; height: 220px;">
				<img style="width: 100%; height: 220px;"
					src="<%=request.getContextPath()%>/${tupian.img}" />
			</div>

			<!-- two -->

			<div style="width: 100%;">
				<div style="width: 100%; height: 120px; background: #EEE5DE;">
					<div style="width: 30%; height: 110px; float: left;">
						<img
							style="height: 70px; width: 70px; margin-left: 10px; margin-top: 10px;"
							src="<%=request.getContextPath()%>/${team.img}" />
					</div>
					<div
						style="width: 70%; height: 40px; float: left; font-size: 14px; line-height: 20px; margin-top: 10px;">
						我是&nbsp;&nbsp;
						<span style="font-size: 20px;">${team.nickname}</span>

						</br>
						我是
						<span style="color: red;">时尚莱梵</span>形象代言人
					</div>
					</br>
					<div
						style="position: relative; top: 10px; line-height: 20px; font-size: 14px;">
						<span style="color: red; font-size: 15px; font-weight: bold;">中国莱梵时尚教育产业平台</span>
						</br>
						<span style="color: red; font-size: 15px; font-weight: bold;">www.cnfuz.com.cn</span>
						</br>
						<span style="color: red; font-size: 15px; font-weight: bold;">学习是投资回报率最高的行动</span>
					</div>
				</div>

				<div
					style="height: 140px; width: 100%; background: #EE2C2C; text-align: center;">
					<div style="position: relative; top: 10px;">
						<div
							style="height: 100px; width: 100px; background: #fff; margin: auto;">
							<img
								style="position: relative; height: 90px; width: 90px; margin: 5px;"
								src="${team.erweima}" />
						</div>
					</div>
					<div style="clear: both; height: 30px; width: 100%;"></div>
					<div
						style="position: relative; bottom: 15px; font-size: 15px; color: #fff; font-weight: bold;">
						立刻扫描,加入时尚莱梵商学院学习
					</div>

					<div class="line-middle">
						<div class="x2" style="background: #fff;"></div>
						<div class="x8"
							style="font-size: 12px; line-height: 100%; text-align: center; color: #fff;"></div>
						<div class="x2" style="background: #fff;"></div>
					</div>
				</div>
				<!--  -->
			</div>

		</div>

		<div
			style="position: fixed; bottom: 50px; text-align: center; width: 100%; background: white;">
			<a href="javascript:void(0);" onclick="bc();">
				<button
					class="button radius-rounded"
					style="width: 95%; border: 1px solid #000; font-weight: bold;">
					立即生成图片保存并发布推广
				</button>
			</a>
		</div>

		<s:include value="/w/tmpfoot.jsp"></s:include>

	</body>


	<script type="text/javascript">
		function refresh() {
			$("#q").html2canvas();//
		}
		window.refresh();
	
		function bc() {
			//alert("11");
			//获取img标签的src值
			var imgsrc = $("#imgcanvas").attr("src");
			//alert(imgsrc);
			var strs = new Array();
			//除去data:image/png;base64,字段
			strs = imgsrc.split(",");
			var imgcode = strs[1];
			//alert(imgcode);
			document.getElementById("imagecode").value = imgcode;
			document.getElementById("formid").submit();
		}
	</script>


</html>
